Reverse event
Reverse the given event. This will also undo the redemptions and accumulations made on the event.
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/behavior/events/{eventId}/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"reason": "<string>"
}'
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "PURCHASE",
"data": {},
"fulfilled": true,
"reserve": 123,
"queue_message_id": "<string>",
"rewarding_campaigns": [
"<any>"
],
"status": "PENDING",
"result": {},
"issued_at": "2023-11-07T05:31:56Z",
"processing_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"reversed_at": "2023-11-07T05:31:56Z"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The event unique identifier
Body
The reason to reverse the event
Response
The event internal unique identifier
The customer id of the event
The type of the event
"PURCHASE"
The data used in the event
If the event was fulfilled.
The number of days to reserve the rewards
The message id in the queue
The campaigns that rewarded the event including the rules that matched
The status of the event
PENDING
, PROCESSING
, FAILED
, RESOLVED
, CANCELLED
, EXPIRED
, REVERSED
The result of the event
The date when the event was issued
The date when the event was processed
The date when the event was resolved either succeed or failed
The date when the event was cancelled
The date when the event expired
The date when the event was reversed
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/behavior/events/{eventId}/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"reason": "<string>"
}'
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "PURCHASE",
"data": {},
"fulfilled": true,
"reserve": 123,
"queue_message_id": "<string>",
"rewarding_campaigns": [
"<any>"
],
"status": "PENDING",
"result": {},
"issued_at": "2023-11-07T05:31:56Z",
"processing_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"reversed_at": "2023-11-07T05:31:56Z"
}
}